package com.ds.smartstudio.config;

import com.ds.smartstudio.common.interceptor.JwtInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;



@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Autowired
    JwtInterceptor jwtInterceptor;
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(jwtInterceptor)
//                .addPathPatterns("/**")
//                // 不能直接 **/login必须加 /
//                .excludePathPatterns("/**/login", "swagger/**", "/swagger-ui.html", "swagger-ui.html", "/webjars/**", "/swagger-ui.html/*", "/swagger-resources", "/swagger-resources/**");
//    }
}
